import { createApp } from 'vue'
import App from './App.vue'
//引入模板的全局的样式
import '@/styles/index.scss'
//引入element-plus插件与样式
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
//引入路由
import router from './router'
//引入仓库
import pinia from './stores'
// 引入 icon
import { Icon } from '@iconify/vue'

const app = createApp(App)
app.use(ElementPlus, {
    locale: zhCn,
})
app.use(pinia)
app.use(router)
app.component('IconSets', Icon)
//引入路由守卫
import './permisstion.js'
app.mount('#app')
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}